/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.overview-container {
  display: flex;
  justify-content: center;
  padding-top: 2%;
  padding-right: 1.5%;

  .overview-sub-container {
    width: 66%;
    background: linear-gradient(
      92.1deg,
      #9ebcedb2 19.16%,
      rgba(163, 136, 245, 0.651) 79%,
      rgba(234, 68, 53, 0.493) 135.24%
    );
    border-radius: 12px;
    .overview-text {
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 500;
      font-size: 20px;
      line-height: 24px;
      color: #5c5f61;
      padding: 2%;
    }
    .overview-content {
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 400;
      font-size: 19px;
      line-height: 30px;
      color: #161a1d;
      padding-left: 2%;
      padding-right: 2%;
      padding-bottom: 2%;
    }

    .overview-button {
      button {
        font-family: 'Roboto';
        font-style: normal;
        font-weight: 400;
        font-size: 20px;
        line-height: 24px;
        color: #4285f4;
        padding: 40px;
      }
    }
  }
}

.header-container {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #5f6368;
  display: flex;
  justify-content: flex-start;
  width: 66%;
}

.search-result:hover {
  border: 1px solid #dfe0e2;
  border-radius: 10px;
}

.search-result-parent-container {
  display: flex;
  flex-direction: column;
  width: 66%;
  gap: 15px;
  padding-bottom: 5%;
}

.search-result-row-container {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

.search-result {
  padding: 1%;
  padding-top: 2%;
  cursor: pointer;
  border: 1px solid transparent;
  width: 25%;

  .title-container {
    display: flex;
    flex-direction: row;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 31px;
    color: #161a1d;
    display: flex;
    gap: 15px;

    .link-container {
      font-size: 14px !important;
      font-weight: 400 !important;
      color: #676c6f !important;
    }
  }

  .description-container {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #161a1d;
    opacity: 0.8;
    padding: 1%;
    padding-top: 4%;
  }

  .overview-button {
    padding-top: 2%;
    button {
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 400;
      font-size: 16px;
      line-height: 24px;
      color: #4285f4;
    }
  }
}

.padding-top {
  padding-top: 0;
}

.close-container {
  display: flex;
  justify-content: end;
}

.pdf-display {
  display: flex;
  justify-content: center;
}

.overview {
  z-index: 1000;
}

/* card-list.component.scss */
.card-list {
  display: flex;
  gap: 20px; /* Adjust spacing between cards */
}

.card {
  border: 1px solid #eee;
  border-radius: 8px;
  flex: 0 0 auto; /* Prevent cards from stretching */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  padding: 16px;
  transition: transform 0.2s;

  &:hover {
    transform: scale(1.02);
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.15);
    cursor: pointer;
  }

  .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 10px;

    .material-symbols-outlined {
      font-size: 1.2rem;
      margin-right: 5px;
      &.bookmark {
        margin-left: auto; // Push bookmark to right
        cursor: pointer;
      }
    }

    .card-title {
      font-weight: 500;
      width: 250px;
    }

    img {
      width: 100%;
      height: 20vh;
    }
  }

  .card-description {
    flex-grow: 1; // Allow description to take up available space
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 10; /* Number of lines to show */
    -webkit-box-orient: vertical;
    width: 250px;
  }

  .card-footer {
    display: flex;
    align-items: center;
    margin-top: 10px;

    .material-symbols-outlined {
      font-size: 1.2rem;
      margin-right: 5px;
    }
  }
}

.documents-container {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
}

.navigation {
  display: flex;
  justify-content: center;
  margin-top: 20px;

  .nav-button {
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.2s;

    &:hover {
      background-color: #f0f0f0;
    }

    &:disabled {
      opacity: 0.5;
      cursor: default;
    }

    .material-symbols-outlined {
      font-size: 1.5rem;
    }
  }
}

.document-viewer {
  background: rgb(255, 255, 255);
  border-left: 1px solid var(--md-sys-color-outline);
  border-top: 1px solid var(--md-sys-color-outline);
  display: block;
  height: 75%;
  position: fixed;
  right: 0px;
  bottom: 0px;
  width: 35%;
  z-index: 9999;

  .document-viewer-header {
    -webkit-box-pack: justify;
    -webkit-box-align: center;
    -webkit-box-flex: 1;
    align-items: center;
    border-bottom: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex: 1 1 0%;
    justify-content: space-between;
    padding: 8px;
  }

  .document-viewer-content {
    width: 100%;
    height: 100%;
  }
}

.mat-grid-tile-content {
  width: 60vw;
}

.image-generation-container {
  .image-preview {
    padding: 0 2rem;

    .thumbnail {
      width: 100px;
      height: 100px;
      margin-bottom: 10px;
      cursor: pointer;

      .thumbnail-placeholder {
        width: 100%;
        height: 100%;
        background-color: #f0f0f0;

        img {
          width: 100%;
        }
      }
    }

    .main-image {
      flex: 1;
      text-align: center;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        max-height: 50vh;
      }
    }
  }

  .configuration {
    flex: 1;
    display: flex;
    flex-direction: column;

    .input-area {
      display: flex;
      margin-bottom: 20px;

      input {
        flex: 1;
        padding: 8px;
        border: 1px solid #ccc;
      }
    }

    .aspect-ratio,
    .image-style {
      margin-bottom: 20px;

      button {
        margin: 0 10px 10px 0;
      }
    }
  }
}

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) {
}

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) {
}

// Large devices (desktops, 992px and up)
@media (min-width: 992px) {
}

// X-Large devices (large desktops, 1200px and up)
@media (min-width: 1200px) {
}

// XX-Large devices (larger desktops, 1400px and up)
@media (min-width: 1400px) {
}
